﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace visobj
{
    public partial class Form1 : Form
    {
        Bitmap bm;
        myDraw _draw;
        public Form1()
        {
            InitializeComponent();
            bm = new Bitmap(pictureBox1.Width, pictureBox1.Height);
            _draw = new myDraw(bm, pictureBox1); 
        }

        private void Form1_Load(object sender, EventArgs e)
        {
        
        }

        private void button1_Click(object sender, EventArgs e)
        {
            _draw.drawbox(50, 50, 50);
            _draw.drawline(20, 20, 70, 70, Color.Red);
            _draw.drawline(100, 70, 140, 70, Color.Red);
            pictureBox1.Refresh();
        }

  
    }
}
